package pablo.developer;

import pablo.developer.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class Intro extends Activity 
{
	
	private Handler handler;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        handler = new Handler();
        setContentView(R.layout.main);
        
        Thread cargaPantallaIntroThread = new cargaPantallaIntroThread();
        cargaPantallaIntroThread.start();
    }
        
    class cargaPantallaIntroThread extends Thread
    {

		@Override
		public void run() 
		{
			try {
				Thread.sleep(2000);
			} catch (InterruptedException e) {}
			handler.post(new Runnable() 
			{
				public void run() 
				{    
			        Intent mainIntent = new Intent(Intro.this,MenuActivity.class);
			        mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			        Intro.this.startActivity(mainIntent);
			        Intro.this.finish();
				}

	    	});
		}
	}
}